/* @INLINE FILE cookies.bloc.js =============================================================
	* Cookie functions
	* 
	* VAR
	* 
	* FUNC
	* setC
	* getC
	* getCExp
	* get_cdata
	* put_cdata
	* this.put_c
	* init_cdata
	*/
	
	/*
     * Set Cookie (setC)
     * Args:
     * cookie: the cookie to be set
     * value: the value
     */
    var setC=function(cookie,value){
    	jGo.cookie.setCookie(cookie, value, getCExp(), '/', config.domain);
    };
    
    /*
     * Get Cookie (getC)
     * Args:
     * cookie: the cookie to be set
     * Returns:
     * value: the value
     */
    var getC=function(cookie){
    	return jGo.cookie.getCookie(cookie);
    };
    var getCExp = function(){
    	var date = new Date();
    	date.setTime(date.getTime()+(365*24*60*60*1000));
    	return (config.cookie_expires==0?null:date)
    };
    //data cookie
    var get_cdata=function(pos){
    	return getC(config.data_cookie).split('&')[pos];
    };
   
    var put_cdata=function(field,pos){
    	var cdata = getC(config.data_cookie).split('&');
    	cdata[pos]=field;
    	var data = cdata[0];
    	for(var i=1;i<cdata.length;i++){
    		data += '&' + cdata[i];
    	}
    	setC(config.data_cookie,data);
    };
    
    this.put_c=put_cdata;
    
    var init_cdata = function(){
    	//expansion starts at index 20
    	var data=(config.display_timestamp?"inline":"none");
    	data+=(config.sounds_on?"&1":"&0");
    	data+="&1&1&1&1&&&&";
    	data+=(config.trans_default_on?"&1":"&0");
    	data+="&"+config.trans_default_language_code;
    	data+="&"+config.toolbar_default_display;
    	data+="&";
    	data+="&";
    	data+="&";
    	data+="&";
    	data+="&";
    	data+="&";
    	data+="&";
    	jGo.cookie.setCookie(config.data_cookie,data,getCExp(),"/",config.domain);
    };
    
    //cookies.bloc.js =============================================================@END FILE*/